package com.indiv.pmy.transform;

public class TransformFactory {
	public static double[][] generateRotationMatrix(double _degrees) {
		return generateRotationMatrixRadians(Math.toRadians(_degrees));
	}
	
	public static double[][] generateRotationMatrixRadians(double _radians) {
		double[][] rotationMatrix = new double[2][2];
		rotationMatrix[0][0] = Math.cos(_radians);
		rotationMatrix[0][1] = -1*Math.sin(_radians);
		rotationMatrix[1][0] = Math.sin(_radians);
		rotationMatrix[1][1] = Math.cos(_radians);
		return rotationMatrix;
	}
	
	public static double[] generateTranslationMatrix(double _xTranslation, double _yTranslation) {
		double[] translationMatrix = {_xTranslation, _yTranslation};
		return translationMatrix;
	}
	
	public static double[] generateScaleMatrix(double _scale) {
		return generateScaleMatrix(_scale, _scale);
	}
	
	public static double[] generateScaleMatrix(double _xScale, double _yScale) {
		double[] scaleMatrix = {_xScale, _yScale};
		return scaleMatrix;
	}
}
